/*
Date:20220224 19:59PM
key:就是个条件复杂些的斐波那契
*/
class Solution {
public:
    int f1(char a,char b)
    {
        return (int(a)-48)*10+int(b)-48;
    }
    int translateNum(int num) {
    string n=to_string(num);

    vector<int>dp;
    dp.resize(n.size()+1);
    dp[0]=1;
    dp[1]=1;
    for(int i=2;i<n.size()+1;i++)
    {
        if(f1(n[i-2],n[i-1])<=25&&n[i-2]!='0')
        {
            dp[i]=dp[i-1]+dp[i-2];
        }else
        {
            dp[i]=dp[i-1];
        }
    }
    
    return dp[n.size()];
    }

};